package com.inool.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.inool.common.result.Result;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import com.inool.vo.LoginVo;
import com.inool.service.UserService;

@Tag(name = "登陆管理")
@RestController
@RequestMapping("/api")
public class LoginController {
    
    @Autowired
    private UserService userService;

    @Operation(summary = "登陆")    
    @PostMapping("login")
    public Result<Map<String,Object>> login(@RequestBody LoginVo loginVo) {
      
        return Result.ok(userService.login(loginVo));
    }
}
